@font: 16rem;

.w {
    max-width: 2560px;
    margin: 0 auto;
}

header {
    min-width: 1060px;
}


:root {
    --layout-padding: 140px;
}

.header {
    position: relative;
    justify-content: center;
    display: flex;
    min-width: 1060px;
    height: clamp(155px, 20vh, 255px);

    .header-background {
        position: absolute;
        object-fit: cover;
        min-width: 1060px;
        width: 100%;
        height: 100%;

        img {
            max-width: 100%;
            height: 100%;
            object-fit: inherit;
        }
    }

    .header-bar {
        position: absolute;
        display: flex;
        justify-content: space-between;
        align-items: center;
        flex-shrink: 0;
        width: 100%;
        min-width: 1060px;
        height: (64 / @font);
        padding: 0 24px;
        box-sizing: border-box;


        .header-left {
            display: flex;
            align-items: center;
            min-width: 423px;
            margin-right: 30px;

            li {
                line-height: 64px;
                height: 64px;
                font-size: 14px;

                a {
                    display: flex;
                    align-items: center;
                    width: 100%;
                    margin-right: 10px;
                    color: #fff;

                    .download {
                        margin: 0 (6 / @font);
                    }

                    .new-icon {
                        width: (17 / @font);
                        height: (14 / @font);
                        background: url('./images/下载.png') no-repeat;
                        background-size: cover;
                    }
                }

                .first-icon svg {
                    margin-right: 6px;
                }
            }
        }

        .header-center {
            flex: 1;
            display: flex;
            justify-content: center;
            align-items: center;

            .header-search {
                display: flex;
                align-items: center;
                width: 100%;
                max-width: 500px;
                min-width: 254px;
                height: (40 / @font);
                padding: 0 (4 / @font);
                background-color: #DADBDE;
                border-radius: 8px;

                &:hover {
                    background-color: #fff;
                }

                .search-left {
                    flex: 1;
                    height: (32 / @font);
                    line-height: (32 / @font);
                    padding: 0 (8 / @font);

                    input {
                        width: 100%;
                        height: (20 / @font);
                    }
                }

                .search-right {
                    display: flex;
                    justify-content: center;
                    align-items: center;
                    width: (32 / @font);
                    height: (32 / @font);
                    border-radius: 6px;
                    transition: background-color .5s;

                    &:hover {
                        background-color: #E3E5E7;
                    }
                }
            }
        }

        .header-right {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: (486 / @font);
            height: (39.25 / @font);
            margin-left: 30px;
            font-size: 14px;
            color: #fff;

            li {
                display: flex;
                flex-direction: column;
                justify-content: center;
                align-items: center;
                min-width: (35 / @font);
                height: (39 / @font);

                svg {
                    margin-bottom: 2px;
                }

                span {
                    font-size: 13px;
                }

                .header-login {
                    height: (36 / @font);
                    width: (36 / @font);
                    text-align: center;
                    line-height: (36 / @font);
                    background-color: #00AEEC;
                    border-radius: 50%;
                }

                &:last-child {
                    height: (34 / @font);

                    .header-upload {
                        display: flex;
                        justify-content: center;
                        align-items: center;
                        width: (90 / @font);
                        min-width: 34px;
                        height: 100%;
                        margin-left: (16 / @font);
                        background-color: #FB7299;
                        border-radius: 8px;

                        @media (max-width: 1200px) {
                            .header-upload {
                                width: auto;
                            }
                        }

                        svg {
                            margin-right: 5px;
                        }
                    }
                }
            }
        }
    }

    .header-logo {
        position: absolute;
        left: 56px;
        bottom: 0;
        z-index: 1;

        a {
            display: inline-block;
            width: (180 / @font);
            margin-bottom: 10px;

            img {
                width: 162px;
                height: 78px;
            }
        }
    }
}

.header-channel {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 2260px;
    min-width: 1020px;
    height: (110 / @font);
    margin: 0 clamp(20px, (60 / @font), 60px);

    .channel-icons {
        display: flex;

        .channel-icons-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            margin-right: clamp(10px, 24px, 30px);
            font-size: 13px;
            color: rgb(24, 25, 28);

            .icons-item-dynamic,
            .icons-item-popular {
                display: flex;
                justify-content: center;
                align-items: center;
                width: clamp(40px, 3rem, 46px);
                height: clamp(40px, 3rem, 46px);
                margin-bottom: 6px;
                border-radius: 50%;
            }

            .icons-item-dynamic {
                background-color: #FF9A24;
            }

            .icons-item-popular {
                background-color: #F07775;
            }
        }

    }

    .right-channel-container {
        flex: 1;
        display: flex;
        justify-content: space-between;
        align-items: center;

        .channel-items-left {
            display: grid;
            gap: 10px;
            width: 100%;
            grid-template-columns: repeat(11, 1fr);
            grid-template-rows: repeat(2, 1fr);
            padding-right: clamp(20px, 3rem, 30px);
            border-right: 1px solid rgb(227, 229, 231);

            a {
                display: flex;
                justify-content: center;
                align-items: center;
                box-sizing: border-box;
                max-width: 82px;
                min-width: 72px;
                width: 100%;
                height: clamp(22px, 2rem, 26px);
                border-radius: 6px;
                background-color: #F6F7F8;
                letter-spacing: 2px;
                line-height: 1;
            }
        }

        .channel-items-right {
            display: grid;
            grid-template-columns: repeat(3, auto);
            grid-template-rows: repeat(2, 1fr);
            row-gap: 10px;

            a {
                display: flex;
                justify-content: flex-end;
                align-items: center;
                height: clamp(28px, 28px, 40px);

                svg {
                    width: 20px;
                    height: 20px;
                    margin-right: 4px;
                }
            }
        }
    }
}

@media (max-width: 1200px) {
    .header-right li span {
        display: none;
    }

    .header .header-bar .header-right li:last-child .header-upload {
        width: auto;
    }
}

@media (max-width: 1099.9px) {
    .header-channel .right-channel-container .channel-items-left {
        grid-template-columns: repeat(9, 1fr);
    }

    .channel-items-left a:nth-child(n + 19) {
        display: none !important;
    }
}

@media (min-width: 1367px) and (max-width: 1700.9px) {
    .header-channel .right-channel-container .channel-items-left {
        grid-template-columns: repeat(11, 1fr);
    }
}

@media (min-width: 1701px) and (max-width: 2199.9px) {
    .header-channel .right-channel-container .channel-items-left {
        grid-template-columns: repeat(12, 1fr);
    }
}

@media (min-width: 2200px) {
    .header-channel .right-channel-container .channel-items-left {
        grid-template-columns: repeat(14, 1fr);
    }
}

@media (max-width: 1100px) {
    .channel-items-right svg {
        display: none;
    }
}